package com.xhs.controller;

import com.xhs.dto.request.PageUserParams;
import com.xhs.message.ReturnResult;
import com.xhs.service.SysUserService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 系统用户表 控制层。
 *
 * @author xhs
 * @since 2025-06-09
 */
@RestController
@RequestMapping("/sysUser")
public class SysUserController {

    @Resource
    private SysUserService sysUserService;

    /**
     * 分页查询用户
     *
     * @param pageUserParams 查询条件
     * @return ReturnResult<Object>
     */
    @PostMapping("/pageList")
    public ReturnResult<Object> pageList(@Validated @RequestBody PageUserParams pageUserParams) {
        return sysUserService.pageList(pageUserParams);
    }

}
